package com.hmall.common.feigin;

import com.hmall.common.config.FeignConfig;
import com.hmall.common.dto.Address;
import com.hmall.common.dto.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "userservice",configuration = FeignConfig.class)
public interface UserClient {


    @GetMapping("/user/{id}")
    public User findById(@PathVariable("id") Long id);


    @GetMapping("/address/{id}")
    public Address findAddressById(@PathVariable("id") Long id);

}
